angular.module(moduleName + '.controllers')
  .controller('StatisticsCtrl', function($scope, $state) {
    var vm = this;
    vm.pieChartData = {
      "series": [{
        type: 'pie',
        radius: ['35%', '80%'],
        center: ['50%', '50%'],
        label: {
          normal: {
            show: false,
            position: 'inner',
          }
        },
        "name": "拜访类型构成",
        "data": [{
          "name": "计划拜访",
          "value": 1
        }, {
          "name": "临时拜访",
          "value": 6
        }],
        "color": [
          "rgb(253, 105, 79)",
          "rgb(146, 155, 207)"
        ],
        itemStyle: {
          emphasis: {
            shadowBlur: 10,
            shadowOffsetX: 0,
            shadowColor: 'rgba(0, 0, 0, 0.5)'
          }
        }
      }]
    };

    vm.pieChartData1 = {
      "series": [{
        type: 'pie',
        radius: ['35%', '80%'],
        center: ['50%', '50%'],
        label: {
          normal: {
            show: false,
            position: 'inner',
          }
        },
        "name": "日均拜访频次构成",
        "data": [{
          value: 1,
          name: '10次及以上'
        }, {
          value: 2,
          name: '6~9次'
        }, {
          value: 3,
          name: '3~6次'
        }, {
          value: 1,
          name: '0~3次'
        }],
        "color": [
          'rgb(242, 108, 79)',
          'rgb(146, 155, 207)',
          'rgb(85, 204, 245)',
          'rgb(247, 194, 0)'
        ],
        itemStyle: {
          emphasis: {
            shadowBlur: 10,
            shadowOffsetX: 0,
            shadowColor: 'rgba(0, 0, 0, 0.5)'
          }
        }
      }]
    };
    vm.lineChartData = {
      "data": ['3/20', '3/21', '3/22', '3/23', '3/24', '3/25', '3/26'],
      "series": [{
        name: '次数',
        type: 'line',
        symbolSize: 8,
        data: [0, 1, 5, 3, 2, 4, 7],
        itemStyle: {
          normal: {
            color: '#55cef5',
            label: {
              show: true
            },
            lineStyle: {
              color: '#55cef5'
            }
          }
        }
      }]
    }
  });
